home *** CD-ROM | disk | FTP | other *** search
/ QuickTime for the Web (2nd Edition) / QuickTime for the Web (2nd Edition).iso / pc / Demos / Mac / Matthew's Behaviors / Knobƒ / KnobStartAngle < prev   
Encoding:
INI File  |  2001-09-10  |  890 b   |  23 lines

  1. [Name]
  2. KnobStartAngle -- Use with KnobBehavior.
  3. By Matthew Peterson, matthew@pinoko.berkeley.edu
  4.  
  5. [Description]
  6. 2-19-2000
  7. This behavior is used with the KnobBehavior and has no function on its own.
  8. Use it to set the knob's angle to some initial value.
  9.  
  10. Revision History:
  11. Written on 2-19-2000.
  12.  
  13. [Parameters]
  14.  
  15. Initial Angle (degrees), MP_InitialKnobAngle,0
  16.  
  17. [Frame loaded]
  18. SpriteVars  KnobAngle knobCenterx knobCentery
  19. //Set the Angle on Frame Load
  20. KnobAngle = $MP_InitialKnobAngle
  21. KnobCenterX = (spriteofid($ThisSpriteID).FirstCornerX + spriteofid($ThisSpriteID).SecondCornerX + spriteofid($ThisSpriteID).ThirdCornerX + spriteofid($ThisSpriteID).FourthCornerX)/4
  22. KnobCenterY = (spriteofid($ThisSpriteID).FirstCornerY + spriteofid($ThisSpriteID).SecondCornerY + spriteofid($ThisSpriteID).ThirdCornerY + spriteofid($ThisSpriteID).FourthCornerY)/4
  23. spriteofid($ThisSpriteID).executeevent(200022)